#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdbool.h>

//9
bool isPalindrome(int x) {
	int num = 0;
	if (x < 0)
	{
		return false;
	}
	if (x == 0)
	{
		return false;
	}
	while (x != 0)
	{
		num = num * 10;
		num += x % 10;
		x /= 10;
	}
	if (x == num)
	{
		return true;
	}
}

//13
#include <stdlib.h>
#include <string.h>
int roman(char* s)
{
	int sym[26];
	sym['I' - 'A'] = 1;
	sym['V' - 'A'] = 5;
	sym['X' - 'A'] = 10;
	sym['L' - 'A'] = 50;
	sym['C' - 'A'] = 100;
	sym['D' - 'A'] = 500;
	sym['M' - 'A'] = 1000;
	int ans = 0;
	int n = strlen(s);
	for (int i = 0; i < n; i++)
	{
		int value = sym[s[i] - 'A'];
		if (i < n - 1 && value < sym[s[i + 1] - 'A'])
		{
			ans -= value;
		}
		else {
			ans += value;
		}
	}
}
//14
char* longestCommonPrefix(char** strs, int strsSize)
{
	if (strsSize == 0)
	{
		return "";
	}
	for (int i = 0; i < strlen(strs[0]); i++ )
	{
		for (int j = 1; j < strsSize; j++)
		{
			if (strs[0][i] != strs[j][i])
			{
				strs[0][i] = '\0';
				return strs[0];
			}
		}
	}
	return strs[0];
}
int main()
{
	int x = 123;
	isPalindrome(x);
	return 0;
}